<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动练习</title>

    <style>
        .outer1 {
            border: 2px solid black;
            width: 500px;
            background-color: skyblue;
        }

        .inner {
            width: 50px;
            height: 50px;
            background-color: red;
            border: 1px solid black;

            margin: 10px;
        }

        .inner1 {
            float: right;
        }

        .inner2 {
            margin: 10px;
        }

        .inner3 {

            margin: 10px;
        }
    </style>
</head>
<body>
    <div class="outer1">
        <div class="inner inner1">方块1</div>
        <div class="inner inner2">方块2</div>
        <div class="inner inner3">方块3</div>
    </div>
</body>
</html>